package com.evildog.workspace.system.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.system.application.bo.DictTypePageBO;
import com.evildog.workspace.system.application.dto.DictTypeDTO;
import com.evildog.workspace.system.application.dto.DictTypePageDTO;
import com.evildog.workspace.system.application.entity.DictType;
import com.evildog.workspace.system.application.entity.DictTypePageDO;
import com.evildog.workspace.system.application.model.DictTypePageParam;
import com.evildog.workspace.system.application.model.DictTypeParam;
import com.evildog.workspace.system.application.vo.DictTypePageVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface DictTypeConvert {

    DictTypeConvert INSTANCE = Mappers.getMapper(DictTypeConvert.class);

    DictTypePageDTO convert(DictTypePageParam dictTypePageParam);

    DictTypeDTO convert(DictTypeParam dictTypeParam);

    @Mapping(target = "isDeleted", ignore = true)
    DictType convert(DictTypeDTO dictTypeDTO);

    DictTypePageDO convert(DictTypePageDTO dictTypePageDTO);

    @Mappings({})
    PagedResult<DictTypePageBO> convert(IPage<DictTypePageDO> page);

    PagedResult<DictTypePageVO> convert(PagedResult<DictTypePageBO> page);
}